<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改统计销售报表')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-statisticsSell-edit" th:object="${statisticsSell}">
            <input name="statisticsSellId" th:field="*{statisticsSellId}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label">合同id：</label>
                <div class="col-sm-8">
                    <textarea name="contractId" class="form-control">[[*{contractId}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">月份：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="dateMonth" th:value="${#dates.format(statisticsSell.dateMonth, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">销售金额：</label>
                <div class="col-sm-8">
                    <input name="sellTotalMoney" th:field="*{sellTotalMoney}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">出库金额：</label>
                <div class="col-sm-8">
                    <input name="sellStoreTotalMoney" th:field="*{sellStoreTotalMoney}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">利润：</label>
                <div class="col-sm-8">
                    <input name="profitTotalMoney" th:field="*{profitTotalMoney}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">收入金额：</label>
                <div class="col-sm-8">
                    <input name="incomeTotalMoney" th:field="*{incomeTotalMoney}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">对账金额：</label>
                <div class="col-sm-8">
                    <input name="accountTotalMoney" th:field="*{accountTotalMoney}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <input name="remark" th:field="*{remark}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "statistics/statisticsSell";
        $("#form-statisticsSell-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-statisticsSell-edit').serialize());
            }
        }

        $("input[name='dateMonth']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>